<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="generator" content="www.jsdaima.com"
	data-variable=",cn,10001,,10001,M1156015" />
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<title>学员查看</title>
<link rel='stylesheet' href='css/index.css'>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/popper.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>

<script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
<script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script>
<style type="text/css">
.btn {
	text-align: center;
	height: 50px;
	line-height: 30px;
	border-radius: 5px;
	cursor: pointer;
	background-color: cornflowerblue;
	color: block;
	margin: 0 auto;
}
.mess{
	display: inline-block;
	padding: 40px 15px 40px 15px;
	float:left;
}
</style>
</head>
<body class=" nav-header">

	<header class="">
		<div class="head-box">
			<div class="container">
				<div class="head-left">
					<div class="head-left-wrapper">
						<div class="head-left-slide">
							<p>欢迎光临全民健身！</p>

						</div>
					</div>
				</div>
				<div class="head-right">
                        <div class="head-other">
                            <b>
                                登录/注册
                                <i class="caret">
                                </i>
                            </b>
                            <span>
                                <a href="login.html" title="登录">
                                    <i class="fa fa-bookmark">
                                    </i>
                                    登录
                                </a>
                                <hr />
                                <a href="regist.html" title="注册">
                                    <i class="fa fa-book">
                                    </i>
                                    注册
                                </a>
                            </span>
                        </div>
                    </div>
			</div>
		</div>
	</header>
	<nav class="navbar navbar-default met-nav " role="navigation">
		<div class="container">
			<div class="navbar-header">
				<button type="button"
					class="navbar-toggle hamburger hamburger-close collapsed"
					data-target="#navbar-default-collapse" data-toggle="collapse">
					<span class="sr-only"> Toggle navigation </span> <span
						class="hamburger-bar"> </span>
				</button>
				<a href="#" class="navbar-brand navbar-logo vertical-align" title="">
					<h1 class='hide'>全民健身</h1>
					<div class="vertical-align-middle">
						<img src="picture/logo.png" alt="" title="" />
					</div>
				</a>
				<h2 class='hide'></h2>
			</div>
			<div class="collapse navbar-collapse navbar-collapse-toolbar"
				id="navbar-default-collapse">

				<ul class="nav navbar-nav navbar-right navlist">
					<li class="margin-right-20"><a href="index.html" title="首页"
						class="link "> 首页 </a></li>

					<li class="dropdown margin-right-20"><a class="link  "
						href="venueView.html"> 场馆信息 </a>
						<ul style="display: none">
						</ul></li>
					<li class="dropdown margin-right-20"><a class="link  active"
						href="finduser.html"> 学员信息 </a>
						<ul style="display: none">
						</ul></li>
					<li class="dropdown margin-right-20"><a class="link  " href="relationship.html">
                            关注
                        </a>
                        <ul style="display:none">
                        </ul>
                    </li>
                    <li class="dropdown margin-right-20">
                        <a class="link  " href="contact.html">
                            通知
                        </a>
                        <ul style="display:none">
                        </ul>
                    </li>
                    <li class="dropdown margin-right-20">
                        <a class="link  " href="coach.html">
                            个人中心
                        </a>
						<ul style="display: none">
						</ul></li>
				</ul>
			</div>
		</div>
	</nav>
	
<div class="feedback-box">
	<div class="container" >
	<div class="feedback-cut">
	 <div class="feedback-form"  >
		 <div   id="abc">
                <div class="form-group" >
                	<label >
                           	<b>学员头像:</b><img alt="头像"  v-bind:src="avatar" width="300px" height="300px">
                        </label>
                        <label >
                           	<b>学员姓名:</b>{{user.nickname}}
                        </label>
                    </div>
                     <div class="form-group">
                        <label >
                           	<b>学员住址:</b>{{user.address}}
                        </label>
                    
                        <label >
                           	<b>学员手机号:</b>{{user.phoneNumber}}
                        </label>
                        </div>
                         <div style="float:right ;"><button @click="addstudent(user.uid)" class="btn btn-outline-primary">添加为我的学员</button></div>
                </div>
              
		</div>
		<div id="aaa">该学员成交{{num}}次,其中：</div>
                &nbsp;&nbsp;&nbsp;<label id="bbb">好评{{nice}}次</label>  
                &nbsp;&nbsp;&nbsp;<label id="ccc">中评{{com}}次</label>
                &nbsp;&nbsp;&nbsp;<label id="ddd">差评{{bad}}次</label><br>
                
                <div style="float:left ;" class="mess" id="jjj"><b>留言:</b>
                	<textarea rows="3" cols="80" v-model="messg"></textarea>
                	<button @click="addMessageUser()" class="btn btn-outline-primary">提交留言</button>
                </div>
	</div>
	</div>
	  
</div>


<div class="met-footnav">
		<div class="container">
			<div class="row mob-masonry">
				<div class="col-md-2 col-sm-3 col-xs-6 list masonry-item">
					<h4>
						<a href="#" title="关于我们"> 关于我们 </a>
					</h4>

				</div>
				<div class="col-md-2 col-sm-3 col-xs-6 list masonry-item">
					<h4>
						<a href="#" title="新闻资讯"> 新闻资讯 </a>
					</h4>

				</div>
				<div class="col-md-2 col-sm-3 col-xs-6 list masonry-item">
					<h4>
						<a> 会馆信息 </a>
					</h4>

				</div>
				<div class="col-md-2 col-sm-3 col-xs-6 list masonry-item">
					<h4>
						<a> 更多 </a>
					</h4>
				</div>
				<div class="col-md-4 col-ms-12 col-xs-12 info masonry-item">
					<div class="info-phone">
						<b> 服务热线 </b> <em> <a> 400-123-4567 </a>
						</em>
						<p>客服服务时段：周一至周五，9:30 - 20:30，节假日休息</p>

					</div>
				</div>
			</div>
		</div>
	</div>

	<footer>
		<div class="container text-center">
			<div class="powered_by_metinfo">Copyright &copy; 2002-2020 全民健身
				版权所有</div>
		</div>
	</footer>
	<button type="button"
		class="btn btn-icon btn-primary btn-squared met-scroll-top hide">
		<i class="icon wb-chevron-up" aria-hidden="true"> </i>
	</button>
	<script src="js/index.js"></script>
		<script type="text/javascript">
var uid = window.location.href.split("=")[1];//截取字符串
new Vue({
	el:"#abc",
data(){
		return{
			user:null,
			avatar:""
		}
},
mounted(){	//当页面元素加载完时执行
		/* var params =new URLSearchParams();
		params.append("uid",uid) */
		axios.get(
			"/coach/findUserByUid?uid="+uid
			/* params */
		).then(res=>{
			console.info(res.data.data);
			this.user=res.data.data;
			this.avatar=res.data.data.avatar;
		});
	},
	methods:{
		addstudent:function(id){
			//alert(id);
			var params =new URLSearchParams();
			params.append("uid",id)
			axios.post(
				"/coach/addMyStudent",	
				params
			).then(res=>{
				if(res.data.code==200){
					alert("添加成功！");
				}else{
					alert(res.data.msg);
				}
			});
		}
	},
});
 new Vue({
	el:"#aaa",
data(){
		return{
			num:null
		}
},
mounted(){	//当页面元素加载完时执行
		var params =new URLSearchParams();
		params.append("uid",uid)
		axios.post(
			"/coach/findOrderCountByUid",	
			params
		).then(res=>{
			console.info(res.data.data);
			this.num=res.data.data;
		});
	},
});
new Vue({
	el:"#bbb",
data(){
		return{
			nice:null
		}
},
mounted(){	//当页面元素加载完时执行
		var params =new URLSearchParams();
		params.append("uid",uid)
		axios.post(
			"/coach/findNiceOrderCountByUid",	
			params
		).then(res=>{
			console.info(res.data.data);
			this.nice=res.data.data;
		});
	},
});
new Vue({
	el:"#ccc",
data(){
		return{
			com:null
		}
},
mounted(){	//当页面元素加载完时执行
		var params =new URLSearchParams();
		params.append("uid",uid)
		axios.post(
			"/coach/findComOrderCountByUid",	
			params
		).then(res=>{
			console.info(res.data.data);
			this.com=res.data.data;
		});
	},
});
new Vue({
	el:"#ddd",
data(){
		return{
			bad:null
		}
},
mounted(){	//当页面元素加载完时执行
		var params =new URLSearchParams();
		params.append("uid",uid)
		axios.post(
			"/coach/findBadOrderCountByUid",	
			params
		).then(res=>{
			 if(res.data.code==500){
					location.href="/error/500.html";
				}
			console.info(res.data.data);
			this.bad=res.data.data;
		});
	},
}); 
new Vue({
	el:"#jjj",
	data () {
	    return {
	    	messg: ''
	    }
	},
	methods:{
		addMessageUser:function(){
			var params =new URLSearchParams();
			params.append("id",uid)
			params.append("messages",this.messg)
			axios.post(
				"/coach/addMessageUser",	
				params
			).then(res=>{
				if(res.data.code==200){
					 if(res.data.code==500){
	  						location.href="/error/500.html";
	  					}
					alert("留言成功！");
				}else{
					alert(res.data.msg);
				}
			});
		}
	}
}); 
</script>
</body>
</html>